package org.itboys.mobile.util;


import org.itboys.commons.utils.time.TimeUtils;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TestList {
    private long id;
    private int age;

    public TestList(long id, int age) {
        this.id = id;
        this.age = age;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static void main(String[] args) {
        List<TestList> list1=new ArrayList<>();
        list1.add(new TestList(11,2));
        list1.add(new TestList(21,3));
        list1.add(new TestList(31,4));
        list1.add(new TestList(41,5));
        list1.add(new TestList(51,6));
        list1.add(new TestList(61,7));

        for(int i=0;i<1;i++){
            for(TestList testList:list1){
                if(testList.getId()>2l){
                    System.out.println("AAAAAAAA ");
                    testList.setAge(testList.getAge()-100);
                    break;
                }
            }

        }
       /* for(TestList testList:list1){
            testList.setAge(testList.getAge()-100);

        }*/


        for(TestList testList:list1){
            System.out.println("testList.getId()="+testList.getId()+"testList.getAge()="+testList.getAge());
        }
	}
}

